{include file="header.html"}
<style>
.infoTable label {
  display: block;
  height: 25px;
  line-height: 25px;
  margin-left: 5px;
  color: #444;
}
</style>
<script type="text/javascript">
    //<!CDATA[
    $(function(){
        $('#share_form').validate({
            errorPlacement: function(error, element){
                $(element).next('.field_notice').hide();
                $(element).after(error);
            },
            success       : function(label){
                label.addClass('right').text('OK!');
            },
            rules : {
                key : {
                    required : true,
                    maxlength: 100
                },
                code  : {
                    required : true
                },
                value  : {
                    required : true
                },
                order : {
                    number   : true
                }
            },
            messages : {
                key : {
                    required : '{$lang.key_required}',
                    maxlength: '{$lang.title_maxlength_error}'
                },
                code  : {
                    required : '{$lang.code_required}'
                },
                value  : {
                    accept   : '',
                    required : '字典值不能为空'
                },
                order  : {
                    number   : '{$lang.number_only}'
                }
            }
        });
    });
    //]]>
</script>
<div id="rightTop">
    <p>字典</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=dictionary">{$lang.manage}</a></li>
        {if $dictionary.d_tid}
        <li><span>{$lang.edit}</span></li>
        {else}
        <li><span>{$lang.add}</span></li>
        {/if}
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="share_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">
                    {$lang.code}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input style="float: left;" class="infoTableInput2" id="code" type="text" name="code" value="{$dictionary.d_code|escape}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.key}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input style="float: left;" class="infoTableInput2" id="key" type="text" name="key" value="{$dictionary.d_key|escape}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.value}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input style="float: left;" class="infoTableInput2" id="value" type="text" name="value" value="{$dictionary.d_value|escape}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.type}:</th>
                <td class="paddingT15 wordSpacing5">
                    {html_radios options=$type checked=$dictionary.d_del name=type}
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.sort_order}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input style="float: left;" class="infoTableInput2" id="order" type="text" name="order" value="{$dictionary.d_order}" />
                </td>
            </tr>
            <tr>
                <th></th>
                <td class="ptb20">
                    <input style="float: left;" class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                    
                </td>
            </tr>
        </table>
    </form>
</div>
{include file="footer.html"}
